package cn.comtom.ewbs.signature.common.enums;

/**
 * 错误码定义
 * @author liuhy
 */
/**
 * @author liuhy
 *
 */
public enum BasicError implements ErrorCode {

    OK_KEY_VALUE("000","操作成功!"),
    
    OPT_FALID_VALUE("001","操作失败！"),
    
    NOT_TOKEN_ERROR("002","未提供token！"),
    
    NOT_PERMISSION_ERROR("003","无此权限！"),

    PARAM_VALID_ERROR("004","参数校验失败！"),
	
	NOT_SAFE_AUTH("005","二级认证失败！"),
	
	NOT_BASIC_AUTH("006","http basic认证失败！"),
	
	TOKEN_TIMEOUT_ERROR("007","token已过期！"),
	
	BE_REPLACED_ERROR("008","账号已在其他地方登录！"),
	
	KICK_OUT_ERROR("009","token已被踢下线！"),
	
	NOT_LOGIN_ERROR("010","未登录！"), 
	
	INVALID_TOKEN_ERROR("011","无效token！"),
	
	NOT_ROLE_ERROR("012","无此角色！"),
	
	DISABLE_SERVICE_ERROR("013","此账号已被禁止访问服务！"),
	
	NOT_USER_ERROR("014","账号不存在！"),
	
	PASSWORD_ERROR("015","密码错误！"),
	
	PASSWORD_ERROR_OVER5("016","当日密码错误次数已达上限,请明日再试！"),
	
	CONFIRMED_PWD_ERROR("017","确认密码不一致！"),
	
	CAPTCHA_CODE_ERROR("018","验证码不正确!"),
	
	DEV_REPEAT_ERROR("019","设备已经存在!"),
	
    VERIFY_SIGN_FAILURE("020","签名验证失败"),

    IMPORT_CERT_FAILURE("021","导入证书失败"),
    
    IMPORT_CERTH_FAILURE("022","导入证书链失败"),
    
    SIGN_ERROR("023","签名异常！"),
	
	;
	
	
    /**
     * 编码
     */
    private String code;

    private String msg;


    BasicError(String code,String msg) {
        this.code = BASE_PREFIX + code;
        this.msg=msg;
    }

    @Override
    public String getCode() {
        return this.code;
    }

    @Override
    public String getMsg() {

        return this.msg;
    }

}
